<?php
// Folio Setup Options

global $CFG;
$FOLIO_CFG->version = 0.91;

//die('Update the lib.php file with the youtrube ref.  char encoding fixed');

// enable debug settings
ini_set('display_errors','1');
ini_set('display_startup_errors','1');
error_reporting (E_ALL);


///////////////////////////////////////////////////////////////////////////////////////
//  PAGE OPTIONS
///////////////////////////////////////////////////////////////////////////////////////

// Default send-to entry
//$FOLIO_CFG->page_defaultsendto = 'admin@cgu.edu';

// Who has permission to download pages en mass?
$FOLIO_CFG->page_globaldownload = array('news','garrettn', 'thomsb','leroyg','ryant','olfmanl','chatterjees','horant');

// Default permission level for a new page.  Can be PUBLIC, MODERATED, or PRIVATE
$FOLIO_CFG->page_defaultpermission = 'MODERATED';

// Keep old pages in the rss/activity feed. AKA, if bob makes a change, and then tim, do you only want to see
//     tim's?  If you want both, set to false, else true.
//    Please note that this doesn't change the page history records, those are always kept.  it's just about
//    exposing the record changes thru the feed system.
$FOLIO_CFG->page_deleteoldpagesfromrss = false;

// In the sidebar, what text do you want above the pages for a displayed user?
$FOLIO_CFG->page_sidebartitle = 'Pages';

// Sets the style of the time/date display for folio
//  Also set the default timezone.
//  See for values: http://us2.php.net/date_default_timezone_set
$FOLIO_CFG->gmstyle = "M j, Y - g:ia";
date_default_timezone_set('America/Los_Angeles'); // Other option is GMT

// Size of the edit screen
$FOLIO_CFG->page_edit_height = "300px";
$FOLIO_CFG->page_edit_width = "95%";

// List of sidebar items
//      This is used by folio to remove all sidebar items when editing a portfolio page.
//      If you have custom plug-ins, add their name here so that they won't show up.
$FOLIO_CFG->sidebar_title_list= array(
            'folio_inbox','sidebar-profile','sidebar-stats','sidebar-blog',
            'sidebar-friends','sidebar-communities','sidebar-owned-communities',
            'sidebar-files','calendar','sidebar-6');

// Video Embedding Formats
//        Use this to translate from the url of an embedded video to the embedded
//        video html code.
//        Note that youtube is the default for historical compatability reasons.
//        The url can not be longer than 256 characters due to PHP's eregi_replace
//        Please remember to properly escape url characters in the regex url and html.
//            EG: ? => ?
/*
$FOLIO_CFG->embed_code = array(
        array(
            "name"=>"Google",
            "url"=>"{{([http://]*)video.google.com/videoplay?docid=([A-Za-z0-9-]+)}}",
            "html"=>"<embed style='width:400px; height:326px;' id='VideoPlayback' " .
                "type='application/x-shockwave-flash' src='http://video.google.com/" .
                "googleplayer.swf?docId=\2' flashvars=''> </embed>"
        )
        
        array(
            "name"=>"YouTube",
            "url"=>"{{www.youtube.com/watch?v=(.*)}}",
            "html"=>"\1"
        )

        array(
            // Default to youtube format when they don't put in the
            //        the url.
            "name"=>"YouTube",
            "url"=>"{{(.*)}}",
            "html"=>"<object width='425' height='355'><param name='movie' value='" .
                "http://www.youtube.com/v/{1}&rel=1'></param>" .
                "<param name='wmode' value='transparent'></param>" .
                "<embed src'http://www.youtube.com/v/{1}&rel=1' " .
                "type='application/x-shockwave-flash' wmode='transparent' " .
                "width='425' height='355'></embed></object>"

        )    

    );
*/
///////////////////////////////////////////////////////////////////////////////////////
//  LOGGING OPTIONS
///////////////////////////////////////////////////////////////////////////////////////

// One way of improving Apache logs is to add the user's username to each entry.
// Some older versions of apache have problems with this, in which case you should
//      comment it out.
// Insert the following line into your httpd.conf file *****AFTER REMOVING the XXXXXXXXX section.***
//      I had to add the XXXXXX as there is a php closing tag there.
//    LogFormat "Username:"%{username}n" %h %l %u %t "%r" %XXXXXXXXXXXXXXX>s %b "%{Referer}i" "%{User-Agent}i" " combined
if (isset($_SESSION ) ) {
    apache_note('username',$_SESSION['username']);
}

// Folio has the option to keep track a historical record of user logons.
// If you want to track this data, then set this option to "Y".  If you put it
//    as 'N', then old logons will be deleted.
$FOLIO_CFG->track_logons = 'Y';
$FOLIO_CFG->track_pagelog = true;


///////////////////////////////////////////////////////////////////////////////////////
//  SIDEBAR DISPLAY OPTIONS
///////////////////////////////////////////////////////////////////////////////////////

// Disable  menu links.
// If you do not want to disable certain options, leave the array empty.  Do not comment out
//    the variable.

// TOP MENU
// Some common options are
//        'folio' <- wiki page link, 'folio_feeds' <- activity
//    This will only work with plug-ins loaded prior to the pagesetup being run, so its
//        not perfect, and really only ideal for getting rid of folio entries.
$FOLIO_CFG->disabled_topmenuitems = array(); //'folio_feeds', 'folio');

// SIDE MENU
//      Folio consolodates some of the side-links.
//      These are normally disabled, as the folio side-menu replaces their functionality.
//      However, if you want these, then remove them from the following array.  In addition,
//      change the FOLIO_CFG->disabled_foliomenuitems variable
//      to keep that from showing them.
$FOLIO_CFG->disabled_sidemenuitems = array( 'sidebar-blog', 'sidebar-files' );

// FOLIO MENU
// This can be used to disable certain elements from the wiki folio sidemenu. As an example, if you decide to have
//      the normal blog sidebar shown, then you will want to not show the wiki blog link.
// Options ( 'weblog', 'files', 'profile', 'wiki' )
$FOLIO_CFG->disabled_foliomenuitems = array() ;

// Do you want to only show a link to the pages for the user, or actually
//      show the expanded tree?  Note that this only applies when you're
//      not actually loooking at a page, then the tree will be expanded.
$FOLIO_CFG->expand_page_tree = true;

// Set the name of the home page.  Defaults to 'Portfolio', but can be reset to other
//    values.  People who have not created a homepage yet will see this as the
//      default name.
// NOTE: The value set for individual templates' homepage over-rides this.  As a result,
//      it is mainly useful for setting the link for communities who have not yet created their pages.
$FOLIO_CFG->page_defaulthomepage = 'Pages';


///////////////////////////////////////////////////////////////////////////////////////
//  CONSTANTS
///////////////////////////////////////////////////////////////////////////////////////

// Status for db records.
define( 'FOLIO_HISTORY', 0);
define( 'FOLIO_ACTIVE', 1);
define( 'FOLIO_DRAFT', 2);


///////////////////////////////////////////////////////////////////////////////////////
//  Images
///////////////////////////////////////////////////////////////////////////////////////

// Artifacts in pages are automatically sized to be, at most, the maximum given
//      below.  Change this when you have a layout that it different from normal.
//      Size in px.
$FOLIO_CFG->maximum_image_width = 640;


// DEPRECIATED

// Labels
//      These are hardcoded in multiple places, do not change w/o extensive checking.
//$FOLIO_CFG->template_unknown_legacy = 0;
//$FOLIO_CFG->template_wiki = 1;
//$FOLIO_CFG->template_portfolio = 2;
// Compromise format is 3, where we have a body-text and attachments

// Sets the default wiki and portfolio options.
//      Normally defaults to wikis for communities and portfolios for people.
//$FOLIO_CFG->page_defaulttemplate_person = 2; // portfolio
//$FOLIO_CFG->page_defaulttemplate_community = 1; // wiki


?>
